package org.Image.management.SpringDataService.CopyUtils;


import org.Image.management.SpringDataService.Service.Sys_User.Pojo.dto.RegisterRequest;
import org.Image.management.SpringDataService.Service.Sys_User.Pojo.mapper.User;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring")
public abstract class CopyUserUtils {

    public static final CopyUserUtils MAPPER = Mappers.getMapper(CopyUserUtils.class);

    @Mappings({
            @Mapping(target = "userName", source = "name"),
            @Mapping(target = "userDelete", expression = "java(false)")
    })
    public abstract User RegisterRequestToUser(RegisterRequest user);

}
